package com.yunji.base.dao.impl;

import com.yunji.base.dao.IPayoutPersonDao;
import com.yunji.base.domain.PayoutPersonDO;
import com.yunji.base.mapper.IPayoutPersonMapper;
import com.yunji.common.base.BaseDaoImpl;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author : peter-zhu
 * @date : 2024/12/12 09:45
 * @description : TODO
 **/
@Repository
public class PayoutPersonDaoImpl extends BaseDaoImpl<IPayoutPersonMapper, PayoutPersonDO> implements IPayoutPersonDao {
    @Override
    public List<PayoutPersonDO> listByBelongId(Long belongId) {
        return lambdaQuery().eq(PayoutPersonDO::getBelongId, belongId).list();
    }

    @Override
    public PayoutPersonDO getByPayMode(Long belongId, Integer payMode) {
        return lambdaQuery().eq(PayoutPersonDO::getBelongId, belongId).eq(PayoutPersonDO::getPayMode, payMode).one();
    }
}
